package com.item.model.controller;

import com.alibaba.fastjson.JSONObject;
import com.item.model.annocation.RequestLog;
import com.item.model.entity.result.ResultVo;
import com.item.model.util.ResultVoUtil;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.MDC;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

@Slf4j
@Controller
@RequestMapping("/log")
public class WxSysLogController {


    @GetMapping("/aa")
    @ResponseBody
    @RequestLog
    public ResultVo aaa(String aaa){
        MDC.putCloseable("get_info",String.valueOf(22222));

        JSONObject orderJsonObject = new JSONObject();

        log.info("----controller方法要结束了-[{}]",new Date());
        return ResultVoUtil.success("asfdsaf");
    }
}

